package com.wuchengdong.web.pojo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@ToString
@TableName("user")
@ApiModel("用户表")
public class User {
    /**
     * 用户的唯一主键
     */
    @ApiModelProperty("用户的唯一主键")
    @TableId
    private Integer id;

    @ApiModelProperty("用户名")
    private String name;

    @ApiModelProperty("用户手机号码")
    private String phone;

    @ApiModelProperty("用户绑定的邮箱")
    private String email;

    @ApiModelProperty("密码")
    @TableField(select = false) //查询时不会带出
    private String password;

    @ApiModelProperty("创建时间")
    private LocalDateTime createdAt;
}
